/*
 * @Description:
 * @Author: jun.wu
 * @Date: 2022-09-21 14:17:01
 * @LastEditors: jun.wu
 * @LastEditTime: 2022-10-19 17:03:01
 */
import request from "@/utils/request";

export function login(data) {
  return request({
    url: "/sys/login", // 因为所有的接口都要跨域 表示所有的接口要带 /api
    method: "post",
    data, //请求体参数
  });
}
//获取用户基本信息
export function getUserInfo() {
  return request({
    url: "/sys/profile",
    method: "post",
  });
}

//根据用户id获取用户信息
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`, //默认的get类型不用写
  });
}

//获取组织架构的数据
export function getDepartments() {
  return request({
    url: "/company/department",
  });
}
